package Context;

import java.util.Properties;

/**
 * @category Context module
 * @author Sean Lionheart
 * @version 1.0.0.0
 * The context which contains the properties of the configuration.
 */
public class Context {
	
	private Properties properties;			//The properties of the configuration.
	
	/**
	 * Set the properties of the context with the loaded 
	 * @param properties The loaded properties.
	 */
	public void setProperites(Properties properties) {
		this.properties = properties;
	}
	
	/**
	 * Get the value of the property by the given key
	 * @param propertyName The name(key) of the property
	 * @return The value of the specified property.
	 */
	public String getProperty(String propertyName) {
		return properties.getProperty(propertyName);
	}
	/**
	 * Get all the properties.
	 * @return all of the properties.
	 */
	public Properties getAllProperties() {
		return properties;
	}
	/**
	 * Set the property to the given value.
	 * @param propertyName The specified property name.
	 * @param propertyValue The given value.
	 */
	public void setProperties(String propertyName,String propertyValue) {
		properties.setProperty(propertyName, propertyValue);
	}
	Context() {
		
	}
}
